gtk4.git
9 years agogsk: Add specific debug type for shaders
Emmanuele Bassi [Fri, 8 Jul 2016 15:22:33 +0000 (16:22 +0100)]
gsk: Add specific debug type for shaders

So that we don't lose GskShaderBuilder debugging messages in the stream
of GskGLRenderer ones.

9 years agogsk: Add GskGLDriver
Emmanuele Bassi [Fri, 8 Jul 2016 15:21:13 +0000 (16:21 +0100)]
gsk: Add GskGLDriver

We can move the caching and management of textures, VAOs, and state of
the GL machinery into a single object, GskGLDriver.

9 years agogsk: Use the right pointer to the parent RenderItem
Emmanuele Bassi [Wed, 6 Jul 2016 16:10:12 +0000 (17:10 +0100)]
gsk: Use the right pointer to the parent RenderItem

We copy the local RenderItem into the render items array, so we need to
use the copy in the array in order to get the correct reference.

9 years agoEnsure that render nodes are translated
Emmanuele Bassi [Tue, 5 Jul 2016 10:58:44 +0000 (11:58 +0100)]
Ensure that render nodes are translated

The clip rectangle may have non-zero offsets, so we need to ensure that
the GskRenderNode associated to the rendered area is translated by those
same offsets.

9 years agogsk: Add fundamental type annotations for GskRenderNode
Emmanuele Bassi [Mon, 4 Jul 2016 13:07:24 +0000 (14:07 +0100)]
gsk: Add fundamental type annotations for GskRenderNode

We need to annotate the GskRenderNode so that the introspection
machinery can find the functions for managing reference counting
and GValues.

9 years agogsk: Add 'blit' program
Emmanuele Bassi [Mon, 4 Jul 2016 12:55:00 +0000 (13:55 +0100)]
gsk: Add 'blit' program

For the root node we do not need to use blending, as it does not have
any backdrop to blend into. We can use a simpler 'blit' program that
only takes the content of the source and fills the texture quad with
it.

9 years agogsk: Consolidate program creation and storage
Emmanuele Bassi [Mon, 4 Jul 2016 12:46:22 +0000 (13:46 +0100)]
gsk: Consolidate program creation and storage

We should use ShaderBuilder to create and store programs for the GL
renderer. This allows us to simplify the creation of programs (by moving
the compilation phase into the ShaderBuilder::create_program() method),
and move towards the ability to create multiple programs and just keep a
reference to the program id.

9 years agodocs: Add more GSK documentation
Emmanuele Bassi [Sun, 3 Jul 2016 23:23:19 +0000 (00:23 +0100)]
docs: Add more GSK documentation

9 years agogsk: Add more modes to the blend shader
Emmanuele Bassi [Sun, 3 Jul 2016 22:02:56 +0000 (23:02 +0100)]
gsk: Add more modes to the blend shader

Use the compositing CSS spec at:

  https://www.w3.org/TR/compositing-1/#blending

For the implementation.

9 years agogsk: Don't store the uniform and attribute location twice
Emmanuele Bassi [Sun, 3 Jul 2016 21:54:30 +0000 (22:54 +0100)]
gsk: Don't store the uniform and attribute location twice

We should keep the ShaderBuilder around and use it to query the various
uniform and attribute locations when needed, instead of storing those
offsets into the Renderer instance, and copying them. This allows a bit
more flexibility, once we have more than one program built into the
renderer.

9 years agogsk: Add getter for program id in ShaderBuilder
Emmanuele Bassi [Sun, 3 Jul 2016 21:53:16 +0000 (22:53 +0100)]
gsk: Add getter for program id in ShaderBuilder

Since we store it into the ShaderBuilder instance we should also allow
getting the program id.

9 years agogsk: Add debugging notes to ShaderBuilder
Emmanuele Bassi [Sun, 3 Jul 2016 21:38:27 +0000 (22:38 +0100)]
gsk: Add debugging notes to ShaderBuilder

Print out the generated shader and the list of available uniforms and
attributes.

9 years agogsk: Rework how GLSL shaders are built
Emmanuele Bassi [Sun, 3 Jul 2016 20:12:22 +0000 (21:12 +0100)]
gsk: Rework how GLSL shaders are built

The GL renderer should build the GLSL shaders using GskShaderBuilder.
This allows us to separate the common parts into separate files, and
assemble them as necessary, instead of shipping one big shader per type
of GL API (GL3, GL legacy, and GLES).

9 years agogsk: Add ShaderBuilder
Emmanuele Bassi [Sun, 3 Jul 2016 19:04:40 +0000 (20:04 +0100)]
gsk: Add ShaderBuilder

GskShaderBuilder is an ancillary, private type that deals with the
internals of taking GLSL shaders from resources and building them,
with the additional feature of being able to compose shaders from a
common preamble, as well as adding conditional defines (useful for
enabling debugging code in the shaders themselves).

9 years agogsk: Add rendering debug mode for shaders
Emmanuele Bassi [Sun, 3 Jul 2016 17:59:32 +0000 (18:59 +0100)]
gsk: Add rendering debug mode for shaders

It's going to be useful to inject debugging data into the shaders used
by GSK.

9 years agogdk: Add more GDK_GL_ERROR error ids
Emmanuele Bassi [Fri, 1 Jul 2016 15:17:14 +0000 (16:17 +0100)]
gdk: Add more GDK_GL_ERROR error ids

We're going to use them in other locations.

9 years agogsk: Use the node's blend mode in the GL renderer
Emmanuele Bassi [Fri, 1 Jul 2016 11:15:56 +0000 (12:15 +0100)]
gsk: Use the node's blend mode in the GL renderer

9 years agogsk: Store blend mode in the render node
Emmanuele Bassi [Fri, 1 Jul 2016 11:12:30 +0000 (12:12 +0100)]
gsk: Store blend mode in the render node

9 years agogsk: Make GskBlendMode enumeration public
Emmanuele Bassi [Fri, 1 Jul 2016 11:02:43 +0000 (12:02 +0100)]
gsk: Make GskBlendMode enumeration public

9 years agogsk: Allow sampling between parent and child nodes
Emmanuele Bassi [Thu, 30 Jun 2016 16:06:31 +0000 (17:06 +0100)]
gsk: Allow sampling between parent and child nodes

9 years agogsk: Group render state attributes
Emmanuele Bassi [Thu, 30 Jun 2016 14:07:16 +0000 (15:07 +0100)]
gsk: Group render state attributes

9 years agogsk: Turn GskRenderNode into a pure GTypeInstance
Emmanuele Bassi [Wed, 29 Jun 2016 18:05:33 +0000 (19:05 +0100)]
gsk: Turn GskRenderNode into a pure GTypeInstance

Using GObject as the base type for a transient tree may prove to be too
intensive, especially when creating a lot of node instances. Since we
don't need properties or signals, and we don't need complex destruction
semantics, we can use GTypeInstance directly as the base type for
GskRenderNode.

9 years agogtk: Use GskRenderNode to render widgets
Emmanuele Bassi [Thu, 23 Jun 2016 16:35:42 +0000 (17:35 +0100)]
gtk: Use GskRenderNode to render widgets

We need a virtual function to retrieve the GskRenderNode for each
widget, which is supposed to attach its own children's GskRenderNodes.
Additionally, we want to maintain the existing GtkWidget::draw mechanism
for widgets that do not implement get_render_node() — as well as widgets
that have handlers connected to the ::draw signal.

9 years agogtk: Add a GskRenderer to GtkWindow
Emmanuele Bassi [Thu, 23 Jun 2016 16:34:38 +0000 (17:34 +0100)]
gtk: Add a GskRenderer to GtkWindow

Each top-level should have its own GskRenderer, to be used when drawing
the render node tree.

9 years agogsk: Rework GskRenderer and GskRenderNode semantics
Emmanuele Bassi [Wed, 22 Jun 2016 16:30:36 +0000 (17:30 +0100)]
gsk: Rework GskRenderer and GskRenderNode semantics

This commit changes the way GskRenderer and GskRenderNode interact and
are meant to be used.

GskRenderNode should represent a transient tree of rendering nodes,
which are submitted to the GskRenderer at render time; this allows the
renderer to take ownership of the render tree. Once the toolkit and
application code have finished assembling it, the render tree ownership
is transferred to the renderer.

9 years agogsk: Flush the GL render items cache
Emmanuele Bassi [Tue, 26 Apr 2016 13:23:12 +0000 (14:23 +0100)]
gsk: Flush the GL render items cache

Whenever the render tree changes we want to drop the RenderItem arrays,
as each item contains a pointer to the GskRenderNode which becomes
dangling once the root node changed.

9 years agogsk: Add GskRenderer::clear_tree
Emmanuele Bassi [Tue, 26 Apr 2016 13:22:25 +0000 (14:22 +0100)]
gsk: Add GskRenderer::clear_tree

We need a way to clear eventual caches inside GskRenderer subclasses if
the root node has changed.

9 years agogsk: Port GskGLRenderer to GLES
Emmanuele Bassi [Mon, 25 Apr 2016 11:26:46 +0000 (12:26 +0100)]
gsk: Port GskGLRenderer to GLES

Use the appropriate API and shaders if the GdkGLContext was created for
OpenGL ES instead of OpenGL.

9 years agogsk: Use surface-to-texture utility function
Emmanuele Bassi [Mon, 25 Apr 2016 10:41:15 +0000 (11:41 +0100)]
gsk: Use surface-to-texture utility function

Now that we have it.

9 years agogsk: Rename shaders for OpenGL
Emmanuele Bassi [Mon, 25 Apr 2016 10:09:25 +0000 (11:09 +0100)]
gsk: Rename shaders for OpenGL

9 years agogdk: Add utility for uploading Cairo surfaces to GL
Emmanuele Bassi [Mon, 25 Apr 2016 10:29:14 +0000 (11:29 +0100)]
gdk: Add utility for uploading Cairo surfaces to GL

The surface-to-GL upload logic has become more complicated with the
addition of the GLES code paths; it's more logical to have a public
utility function that can be called from GDK users, instead of copy
pasting the whole thing multiple times.

9 years agobuild: Add GSK deps to GTK
Emmanuele Bassi [Wed, 20 Apr 2016 15:00:45 +0000 (16:00 +0100)]
build: Add GSK deps to GTK

9 years agoInitial implementation of GSK rendering pipeline
Emmanuele Bassi [Thu, 17 Mar 2016 13:48:19 +0000 (13:48 +0000)]
Initial implementation of GSK rendering pipeline

GSK is conceptually split into two scene graphs:

 * a simple rendering tree of operations
 * a complex set of logical layers

The latter is built on the former, and adds convenience and high level
API for application developers.

The lower layer, though, is what gets transformed into the rendering
pipeline, as it's simple and thus can be transformed into appropriate
rendering commands with minimal state changes.

The lower layer is also suitable for reuse from more complex higher
layers, like the CSS machinery in GTK, without necessarily port those
layers to the GSK high level API.

This lower layer is based on GskRenderNode instances, which represent
the tree of rendering operations; and a GskRenderer instance, which
takes the render nodes and submits them (after potentially reordering
and transforming them to a more appropriate representation) to the
underlying graphic system.

9 years agogsk: Initial commit / build environment
Emmanuele Bassi [Tue, 14 Jan 2014 13:01:35 +0000 (13:01 +0000)]
gsk: Initial commit / build environment

9 years agolabel: Avoid shadowing variables
Emmanuele Bassi [Tue, 18 Oct 2016 10:29:06 +0000 (11:29 +0100)]
label: Avoid shadowing variables

9 years agoUpdate POTFILES.in
Piotr Drąg [Tue, 18 Oct 2016 01:50:55 +0000 (03:50 +0200)]
Update POTFILES.in

9 years agoAdd a test for cursor names
Matthias Clasen [Mon, 17 Oct 2016 19:28:29 +0000 (15:28 -0400)]
Add a test for cursor names

This tests both that all standard cusor yield a cursor, and that
unknown cursor names yield NULL.

9 years agox11: Add the same message as the wayland backend has
Matthias Clasen [Mon, 17 Oct 2016 19:27:15 +0000 (15:27 -0400)]
x11: Add the same message as the wayland backend has

This seems prudent, if we make noise about missing cursors
on Wayland, we should do the same on X11.

9 years agoReduce a warning to a message
Matthias Clasen [Mon, 17 Oct 2016 19:26:29 +0000 (15:26 -0400)]
Reduce a warning to a message

The warning interferes with having a testcase to check this behavior,
so reduce this to a message.

9 years agoRemove GtkAction
Timm Bäder [Sun, 16 Oct 2016 18:56:47 +0000 (20:56 +0200)]
Remove GtkAction

9 years agoRemove GtkActionGroup
Timm Bäder [Sun, 16 Oct 2016 18:46:37 +0000 (20:46 +0200)]
Remove GtkActionGroup

9 years agoFix unittests
Timm Bäder [Mon, 17 Oct 2016 07:14:39 +0000 (09:14 +0200)]
Fix unittests

9 years agowidget: Not all toplevels are also containers
Timm Bäder [Mon, 17 Oct 2016 07:13:51 +0000 (09:13 +0200)]
widget: Not all toplevels are also containers

9 years agotests/testylecontext: Don't double-free widgetpath
Timm Bäder [Sun, 16 Oct 2016 19:25:38 +0000 (21:25 +0200)]
tests/testylecontext: Don't double-free widgetpath

9 years agoRemove GtkRecentAction
Timm Bäder [Sun, 16 Oct 2016 17:35:49 +0000 (19:35 +0200)]
Remove GtkRecentAction

9 years agoRemove GtkUIManager
Timm Bäder [Sun, 16 Oct 2016 17:28:11 +0000 (19:28 +0200)]
Remove GtkUIManager

9 years agoRemove GtkActivatable
Timm Bäder [Sun, 16 Oct 2016 16:48:05 +0000 (18:48 +0200)]
Remove GtkActivatable

9 years agorecentchooser: Stop implementing GtkActivatable
Timm Bäder [Sun, 16 Oct 2016 16:32:10 +0000 (18:32 +0200)]
recentchooser: Stop implementing GtkActivatable

9 years agorecentchooserdefault: Stop implementing GtkActivatable
Timm Bäder [Sun, 16 Oct 2016 16:26:00 +0000 (18:26 +0200)]
recentchooserdefault: Stop implementing GtkActivatable

9 years agotoolitem: Stop implementing GtkActivatable
Timm Bäder [Sun, 16 Oct 2016 16:22:29 +0000 (18:22 +0200)]
toolitem: Stop implementing GtkActivatable

9 years agoRemove GtkToggleAction
Timm Bäder [Sun, 16 Oct 2016 16:08:39 +0000 (18:08 +0200)]
Remove GtkToggleAction

9 years agoRemove GtkRadioAction
Timm Bäder [Sun, 16 Oct 2016 15:46:00 +0000 (17:46 +0200)]
Remove GtkRadioAction

9 years agoRemove GtkStock
Timm Bäder [Sun, 16 Oct 2016 11:12:16 +0000 (13:12 +0200)]
Remove GtkStock

9 years agoinfobar: Stop looking at stock items
Timm Bäder [Sun, 16 Oct 2016 10:55:27 +0000 (12:55 +0200)]
infobar: Stop looking at stock items

GtkButton doesn't have a use-stock property anymore anyway.

9 years agowindow: Remove decoration-button-layout style property
Timm Bäder [Sat, 15 Oct 2016 19:56:09 +0000 (21:56 +0200)]
window: Remove decoration-button-layout style property

GtkSettings has a gtk-decoration-layout property for this.

9 years agowindow: Remove decoration-resize-handle style property
Timm Bäder [Sat, 15 Oct 2016 19:55:38 +0000 (21:55 +0200)]
window: Remove decoration-resize-handle style property

9 years agotoolbar: Remove max-child-expand child property
Timm Bäder [Sat, 15 Oct 2016 19:34:32 +0000 (21:34 +0200)]
toolbar: Remove max-child-expand child property

9 years agoRemove GtkAlignment
Timm Bäder [Sat, 15 Oct 2016 15:43:56 +0000 (17:43 +0200)]
Remove GtkAlignment

9 years agogtkapplication: Remove deprecated API
Timm Bäder [Fri, 14 Oct 2016 20:07:36 +0000 (22:07 +0200)]
gtkapplication: Remove deprecated API

9 years agotreeview: Remove deprecated adjustment API
Timm Bäder [Fri, 14 Oct 2016 20:01:59 +0000 (22:01 +0200)]
treeview: Remove deprecated adjustment API

9 years agocombobox: Remove deprecated API
Timm Bäder [Fri, 14 Oct 2016 19:55:38 +0000 (21:55 +0200)]
combobox: Remove deprecated API

9 years agoadjustment: Remove deprecated API
Timm Bäder [Fri, 14 Oct 2016 19:50:53 +0000 (21:50 +0200)]
adjustment: Remove deprecated API

9 years agomenutoolbutton: Remove deprecated API
Timm Bäder [Fri, 14 Oct 2016 19:38:50 +0000 (21:38 +0200)]
menutoolbutton: Remove deprecated API

9 years agopopover: Remove deprecated API
Timm Bäder [Fri, 14 Oct 2016 19:35:35 +0000 (21:35 +0200)]
popover: Remove deprecated API

9 years agorange: Remove unused class struct members
Timm Bäder [Fri, 14 Oct 2016 19:35:26 +0000 (21:35 +0200)]
range: Remove unused class struct members

9 years agofilechooserbutton: Remove deprecated API
Timm Bäder [Fri, 14 Oct 2016 19:19:33 +0000 (21:19 +0200)]
filechooserbutton: Remove deprecated API

9 years agomessagedialog: Remove deprecated API
Timm Bäder [Fri, 14 Oct 2016 19:14:18 +0000 (21:14 +0200)]
messagedialog: Remove deprecated API

9 years agobutton: Add icon-name property
Timm Bäder [Fri, 14 Oct 2016 14:01:56 +0000 (16:01 +0200)]
button: Add icon-name property

Remove the old-style button construction that allowed to show both an
icon and a label and change visibility based on a GtkSetting.

9 years agotestsuite/gtk: Use a GtkMenuButton to test exposing objects
Timm Bäder [Fri, 14 Oct 2016 14:01:26 +0000 (16:01 +0200)]
testsuite/gtk: Use a GtkMenuButton to test exposing objects

9 years agodocs/tools/widgets: Stop using gtk_button_set_image
Timm Bäder [Fri, 14 Oct 2016 14:00:26 +0000 (16:00 +0200)]
docs/tools/widgets: Stop using gtk_button_set_image

9 years agobuttonaccessible: Stop looking at the button's image
Timm Bäder [Fri, 14 Oct 2016 13:58:48 +0000 (15:58 +0200)]
buttonaccessible: Stop looking at the button's image

9 years agotests: Add testgaction.c
Timm Bäder [Thu, 13 Oct 2016 17:02:47 +0000 (19:02 +0200)]
tests: Add testgaction.c

9 years agoradiomenuitem: Remove GtkActivatable code
Timm Bäder [Thu, 13 Oct 2016 14:47:08 +0000 (16:47 +0200)]
radiomenuitem: Remove GtkActivatable code

9 years agotoolbutton: Stop implementing GtkActivatable
Timm Bäder [Thu, 13 Oct 2016 14:21:37 +0000 (16:21 +0200)]
toolbutton: Stop implementing GtkActivatable

9 years agoswitch: Stop implementing GtkActivatable
Timm Bäder [Thu, 13 Oct 2016 14:10:31 +0000 (16:10 +0200)]
switch: Stop implementing GtkActivatable

9 years agomenuitem: Stop implementing GtkActivatable
Timm Bäder [Thu, 13 Oct 2016 14:06:03 +0000 (16:06 +0200)]
menuitem: Stop implementing GtkActivatable

9 years agoRemove GtkTable
Timm Bäder [Thu, 13 Oct 2016 13:55:00 +0000 (15:55 +0200)]
Remove GtkTable

9 years agogtkwindow: Stop checking gtk-menu-bar-accel
Timm Bäder [Thu, 13 Oct 2016 13:26:03 +0000 (15:26 +0200)]
gtkwindow: Stop checking gtk-menu-bar-accel

9 years agobutton: Stop implementing GtkActivatable
Timm Bäder [Wed, 12 Oct 2016 20:06:44 +0000 (22:06 +0200)]
button: Stop implementing GtkActivatable

9 years agobutton: Stop checking for GtkSettings:gtk-button-images setting
Timm Bäder [Wed, 12 Oct 2016 20:04:15 +0000 (22:04 +0200)]
button: Stop checking for GtkSettings:gtk-button-images setting

9 years agoStop checking GtkSettings:gtk-enable-mnemonics
Timm Bäder [Wed, 12 Oct 2016 19:56:23 +0000 (21:56 +0200)]
Stop checking GtkSettings:gtk-enable-mnemonics

9 years agowidget: Remove push/pop_composite_child
Timm Bäder [Wed, 12 Oct 2016 18:01:31 +0000 (20:01 +0200)]
widget: Remove push/pop_composite_child

as well as the composite-child property

9 years agowidget: Remove gtk_widget_get_pointer
Timm Bäder [Wed, 12 Oct 2016 17:48:16 +0000 (19:48 +0200)]
widget: Remove gtk_widget_get_pointer

9 years agowidget: Remove docs for style-set
Timm Bäder [Wed, 12 Oct 2016 17:46:46 +0000 (19:46 +0200)]
widget: Remove docs for style-set

9 years agowidget: Remove gtk_widget_reparent
Timm Bäder [Wed, 12 Oct 2016 17:46:23 +0000 (19:46 +0200)]
widget: Remove gtk_widget_reparent

9 years agoscrollbar: Remove style property
Timm Bäder [Tue, 11 Oct 2016 14:43:29 +0000 (16:43 +0200)]
scrollbar: Remove style property

9 years agobuiltinicon: remove unused struct member
Timm Bäder [Tue, 11 Oct 2016 14:43:11 +0000 (16:43 +0200)]
builtinicon: remove unused struct member

9 years agomenuitem: Remove right-justify
Timm Bäder [Tue, 11 Oct 2016 14:41:22 +0000 (16:41 +0200)]
menuitem: Remove right-justify

9 years agolabel: Stop using GdkColor
Timm Bäder [Tue, 11 Oct 2016 13:57:00 +0000 (15:57 +0200)]
label: Stop using GdkColor

9 years agocellrenderer: Remove cell-background-gdk
Timm Bäder [Tue, 11 Oct 2016 13:27:20 +0000 (15:27 +0200)]
cellrenderer: Remove cell-background-gdk

9 years agogtksettings: Remove Deprecated API
Timm Bäder [Tue, 11 Oct 2016 13:04:17 +0000 (15:04 +0200)]
gtksettings: Remove Deprecated API

9 years agowindow: Remove reshow_with_initial_size
Timm Bäder [Tue, 11 Oct 2016 12:50:22 +0000 (14:50 +0200)]
window: Remove reshow_with_initial_size

9 years agoviewport: remove deprecated api
Timm Bäder [Tue, 11 Oct 2016 12:45:43 +0000 (14:45 +0200)]
viewport: remove deprecated api

9 years agogtkdnd: Remove gtk_drag_begin
Timm Bäder [Tue, 11 Oct 2016 12:41:30 +0000 (14:41 +0200)]
gtkdnd: Remove gtk_drag_begin

9 years agogtkmain: Remove deprecated key snooper API
Timm Bäder [Tue, 11 Oct 2016 12:37:22 +0000 (14:37 +0200)]
gtkmain: Remove deprecated key snooper API

9 years agotreeview: Remove unused style properties
Timm Bäder [Tue, 11 Oct 2016 11:34:49 +0000 (13:34 +0200)]
treeview: Remove unused style properties

9 years agobbox: Remove style properties
Timm Bäder [Tue, 11 Oct 2016 11:29:05 +0000 (13:29 +0200)]
bbox: Remove style properties

9 years agogtkdialog: Remove style properties
Timm Bäder [Tue, 11 Oct 2016 11:16:18 +0000 (13:16 +0200)]
gtkdialog: Remove style properties

9 years agocolorbutton: Remove deprecated API
Timm Bäder [Tue, 11 Oct 2016 11:10:02 +0000 (13:10 +0200)]
colorbutton: Remove deprecated API

9 years agomenu: Remove vertical/horizontal-offset style properties
Timm Bäder [Tue, 11 Oct 2016 10:07:33 +0000 (12:07 +0200)]
menu: Remove vertical/horizontal-offset style properties